package com.liuxing.javaSpringBoot.modules.account.service;

import com.github.pagehelper.PageInfo;
import com.liuxing.javaSpringBoot.modules.account.entity.Resource;
import com.liuxing.javaSpringBoot.modules.common.entity.Result;
import com.liuxing.javaSpringBoot.modules.common.entity.SearchBean;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * @File ResourceService.java
 * @Auth liuxing
 * @Date 2021/8/23 17:48
 * @Email liuxing997@foxmail.com
 */
public interface ResourceService {

    //插入资源信息
    Result<Resource> insertResource(Resource resource);

    //根据资源ID修改资源信息
    Result<Resource> updateResourceById(Resource resource);

    //根据资源ID删除资源信息
    Result<Object> deleteResourceByResourceId(int id);

    //根据资源ID查询资源信息
    Resource getResourceByResourceId(int id);

    //根据角色ID查询资源信息
    List<Resource> getResourcesByRoleId(int roleId);

    //查询所有资源信息
    List<Resource> getAllResource();

    //批量插入资源信息
    Result<Object> insertResources(List<Resource> resources);

    //分页查询资源信息
    PageInfo<Resource> getResourcesBySearchBean(SearchBean searchBean);
}
